package io.adrainty.bolee.file.models.bo;

import com.baomidou.mybatisplus.annotation.TableName;
import io.adrainty.bolee.file.models.valobj.FileStorageEnum;
import io.adrainty.bolee.file.models.valobj.FileUploadStatus;
import io.adrainty.bolee.framework.commons.basic.BaseBO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/17 下午11:46
 */

@Data
@Builder
@Schema(description = "文件BO")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("tab_file")
public class FileBO extends BaseBO {
    
    @Serial
    private static final long serialVersionUID = 8448959497246364581L;

    @Schema(description = "业务ID")
    private Long businessId;

    @Schema(description = "业务类型")
    private String businessType;

    @Schema(description = "后缀名")
    private String suffix;

    @Schema(description = "文件名")
    private String fileName;

    @Schema(description = "访问路径")
    private String pathUrl;

    @Schema(description = "存储源标识，参考FileConstant")
    private FileStorageEnum storeFlag;

    @Schema(description = "存储空间名称")
    private String bucketName;

    @Schema(description = "分片上传文件Id")
    private String uploadId;

    @Schema(description = "md5值")
    private String md5;

    @Schema(description = "状态：上传中【sending】，完成【succeed】，失败【failed】")
    private FileUploadStatus status;

    @Schema(description = "企业号")
    private String companyNo;
    
}
